<template>
  <el-card>



    <el-form ref="basicInfoForm" :model="info" label-width="100%" size="mini">
      <h1  style="color: rgb(51, 51, 51); font-size: 24px;text-align: center;" >{{ info.noticeTitle }}</h1>

      <p  style="text-align: center;" >  {{ info.createTime }}</p><br>

      <!--<editor readOnly="false" style="width: 90%; margin:20px auto;" v-model="info.noticeContent" :min-height="192"/>
     -->

        <p  class="img-box1" v-html="info.noticeContent"></p>

    <!--  <image-preview  v-for="item in conimages"  :src="item" class="imgpre" >

      </image-preview>





      <iframe v-if="info.note1 != null" :src="this.$store.state.user.ipaddress+info.note1+'#toolbar=0'" class="ifr"> </iframe>
-->



    </el-form>



    <el-form label-width="100px">
      <el-form-item style="text-align: right;margin-left:-100px;margin-top:10px;">

        <el-button @click="close()">返回</el-button>
      </el-form-item>
    </el-form>
  </el-card>
</template>
<style>
  .img-box1 {
    white-space: pre-wrap;
    width: 90%;

    position: center;
    margin:20px auto;
  }
  .img-box1 img {
    width: 70%;

    position: relative;
    left: 50%;
    transform: translateX(-50%);
  }
  .imgpre{
    width:200px;
    height: 100px;


  }
  .ifr{
    width: 70%;
    height: 700px;

    position: relative;
    left: 50%;
    transform: translateX(-50% );
  }
</style>
<script>
  import { listContent, getContent, delContent, addContent, updateContent } from "@/api/module/gs/thought/thought";

  import watermark from "watermark-dom";
  import {addStatisticsp,updateStatistics,upStatistics1 } from "@/api/module/yzx/cs/statistics";


  export default {
    name: "ThoughtEdit",
    components: {

    },
    computed: {
      conimages: function () {
        let conimages = this.info.note2
        return conimages ? conimages.split(',') : []
      }
    },
    mounted() {
      // 加载水印

      const username = this.$store.state.user.nickname;
      watermark.load({ watermark_txt: username ,watermark_fontsize:'30px',   watermark_alpha:0.12,    watermark_width:300 ,watermark_height:100   });



    },
    data() {
      return {
        // 选中选项卡的 name
        //activeName: "columnInfo",
        // 表格的高度
        tableHeight: document.documentElement.scrollHeight - 245 + "px",
        // 表信息
        tables: [],
        // 表列信息
        columns: [],
        // 字典信息
        dictOptions: [],
        // 菜单信息
        menus: [],
        // 表详细信息
        info: {note1:"",
          note2:""},
      // 查询参数
      queryParams: {
        pageNum: 1,
          pageSize: 10,
          title: undefined,
          operName: undefined,
          businessType: undefined,
          status: undefined
      }
      };
    },
    created() {

      const id = this.$route.query.id;
      if (id) {
        // 获取表详细信息

        getContent(id).then(res => {

          this.info = res.data;

        });

      }
      addStatisticsp(id).then(response => {

      });
    },
    methods: {


      /** 关闭按钮 */
      close() {
        const id = this.$route.query.id;
        getContent(id).then(response => {
          this.form = response.data;
          upStatistics1(this.form).then(response => {
          });
        });
        const obj = { path: "/dangzheng/culturenewindex", query: { t: Date.now(), pageNum: this.$route.query.pageNum } };
        this.$tab.closeOpenPage(obj);
      }
    },

  };
</script>






